<template>
  <div class="member-complaint-page">
    <div class="page-title">
      <div id="back-button" @click="$router.push('/MemberHome')">
        <i href="javascript:void(0)" class="el-icon-arrow-left"></i>
      </div>
      <span>投诉反馈</span>
    </div>

    <div style="padding-top: 10px; width: 98%; margin: 0px auto;">
      <el-input type="textarea" rows="10" maxlength="200" v-model="content" placeholder="请输入 反馈内容"></el-input>
    </div>
    <div align="center">
      <el-button :loading="loading" type="primary" style="width: 50%; margin: 5px auto;" @click="submit">提交反馈</el-button>
    </div>

  </div>
</template>

<script>
export default {
  name: 'MemberComplaint.vue',
  data:function () {
    return {
      loading:false,
      content:''
    }
  },
  methods:{
    submit(){
      if (this.content.length<5){
        return this.$message.error("投诉建议内容必须大于5个字")
      }
      let $this=this
      $this.loading=true
      $this.MyRequest($this.ApiDoNameMember + 'Member/sumbitComplaint', {content:this.content}, function (data) {
        $this.$message.success('返回意见,提交成功!')
        $this.loading=false
        $this.$router.push("/MemberHome")
        $this.$forceUpdate()
      }, function (msg) {
        $this.loading=false
        $this.$message.error(msg)
        // $this.form.password = ''
      })
    }
  }
}
</script>

<style scoped>

</style>
